<?php
//базовый контроллер
class Lib_Controller{
    private $member = array();
    
    function __set($name,$val){
        $this->member[$name] = $val;
    }
    
    function __get($name){
        if (array_key_exists($name, $this->member)) {
            return $this->member[$name];
        }
    }
}
?>